﻿<UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
        x:Class="MDCAdminTool.Controls.SearchDataCache" 
        mc:Ignorable="d" d:DesignHeight="274" d:DesignWidth="542">
    
    <Grid>
        <TextBlock Text="Search By Key:" Margin="12,12,383,227" />
        <TextBox x:Name="tbKey" 
                 Text="{Binding Key}"
                 Height="23" Margin="122,12,110,0" VerticalAlignment="Top" />
        <TextBlock Text="Search By Tag:" Margin="12,41,383,198" />
        <TextBox x:Name="tbTag" 
                 Text="{Binding Tags}"
                 Height="23" Margin="122,42,110,0" VerticalAlignment="Top" />
        
        <Button Content="Search" Height="53" 
                HorizontalAlignment="Right" Margin="0,12,12,0" 
                x:Name="btnSearch" VerticalAlignment="Top" Width="75" 
                >
        	<i:Interaction.Triggers>
        		<i:EventTrigger EventName="Click">
        			<ei:CallMethodAction MethodName="OnSearch" TargetObject="{Binding}"/>
        		</i:EventTrigger>
        	</i:Interaction.Triggers>
        </Button>
        
        <DataGrid 
            ItemsSource="{Binding SearchResult}"
            AutoGenerateColumns="True" Height="180" 
            Margin="12,0,12,12" x:Name="dgResult" 
            VerticalAlignment="Bottom" />
    </Grid>
</UserControl>